package com.ruoyi.web.controller.comprehensive;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.comprehensive.service.ICodeService;
import com.ruoyi.comprehensive.vo.CodeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/comprehensive/code")
public class CodeController extends BaseController {
    @Autowired
    private ICodeService codeService;

    /**
     * 获取编码
     * @param vo
     * @return
     */
    @PreAuthorize("@ss.hasPermi('comprehensive:code:query')")
    @GetMapping("/getDustPreventionCode")
    public AjaxResult getDustPreventionCode(@RequestBody CodeVo vo) {
        String dustPreventionCode = codeService.getDustPreventionCode(vo);
        return success(dustPreventionCode);
    }
}
